<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Options for currencies - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.currency.options.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.currency.options.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.currency.usage.html">Using Zend_Currency</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.currency.html">Zend_Currency</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.currency.description.html">What makes a currency?</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.currency.options" class="section"><div class="info"><h1 class="title">Options for currencies</h1></div>
    

    <p class="para">
        Depending on your needs, several options can be specified at instantiation. All of this
        options have default values. But sometimes it is necessary to define how your currencies
        will be rendered. This includes for example:
    </p>

    <ul class="itemizedlist">
        <li class="listitem">
            <p class="para">
                <em class="emphasis">Currency symbol, shortname or name</em>:
            </p>

            <p class="para">
                <span class="classname">Zend_Currency</span> knows all currency names, abbreviations and
                signs. But sometimes you could be in need to define the string which has to be
                displayed as replacement for a currency.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis">Currency position</em>:
            </p>

            <p class="para">
                The position of the currency symbol is automatically defined. But sometimes you
                could be in need to define it manually.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis">Script</em>:
            </p>

            <p class="para">
                You could define the script which shall be used to display digits. Detailed
                information about scripts and their usage can be found in
                <span class="classname">Zend_Locale</span>&#039;s chapter <a href="zend.locale.parsing.html#zend.locale.numbersystems" class="link">Numeral System Conversion</a>.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis">Number formatting</em>:
            </p>

            <p class="para">
                The amount of currency (generally known as money value) is formatted by
                using the formatting rules defined by the locale. For example is the &#039;,&#039;
                sign in English used as separator for thousands, but in German as precision
                sign.
            </p>
        </li>
    </ul>

    <p class="para">
        The following list mentions all options which could be set. They can either be set at
        initiation or by using the  <span class="methodname">setFormat()</span> method. In any case
        you have to give this options as array.
    </p>

    <ul class="itemizedlist">
        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">currency</span></em>: Defines the abbreviation
                which can be displayed.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">display</span></em>: Defines which part of the
                currency should be used for displaying the currency representation. There are 4
                representations which can be used and which are all described in <a href="zend.currency.description.html" class="link">this
                    table</a>.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">format</span></em>: Defines the format which
                should be used for displaying numbers. This number-format includes for example
                the thousand separator. You can either use a default format by giving a locale
                identifier, or define the number-format manually. If no format is set the locale
                from the <span class="classname">Zend_Currency</span> object will be used. See <a href="zend.locale.parsing.html#zend.locale.number.localize.table-1" class="link">the chapter about number
                    formatting</a> for details.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">locale</span></em>: Defines a locale for this
                currency. It will be used for detecting the default values when other settings
                are omitted. Note that when you don&#039;t set a locale yourself, it will be detected
                automatically which could lead to problems.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">name</span></em>: Defines the full currency name
                which can be displayed.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">position</span></em>: Defines the position at
                which the currency description should be displayed. The supported positions are
                described <a href="zend.currency.position.html" class="link">this section</a>.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">precision</span></em>: Defines the precision which
                should be used for the currency representation. The default value depends on the
                locale and is for most locales <em class="emphasis">2</em>.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">script</span></em>: Defined which script should
                be used for displaying digits. The default script for most locales is
                <em class="emphasis">&#039;Latn&#039;</em>, which includes the digits 0 to 9. Other
                scripts such as &#039;Arab&#039; (Arabian) are using other digits. See <a href="zend.locale.parsing.html#zend.locale.numbersystems" class="link">the chapter about numbering
                    systems</a> for details and available options.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">service</span></em>: Defines the exchange service
                which has to be used when calculating with different currencies.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">symbol</span></em>: Defines the currency symbol
                which can be displayed.
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                <em class="emphasis"><span class="property">value</span></em>: Defines the currency amount
                (money value). Using this option you should also set the
                <span class="property">service</span> option.
            </p>
        </li>
    </ul>

    <p class="para">
        As you can see there is much which could be changed. Still as already mentioned the
        default values for this settings conform the official standard for currency
        representation in every country.
    </p>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.currency.usage.html">Using Zend_Currency</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.currency.html">Zend_Currency</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.currency.description.html">What makes a currency?</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
  <li class="header up"><a href="zend.currency.html">Zend_Currency</a></li>
  <li><a href="zend.currency.introduction.html">Introduction to Zend_Currency</a></li>
  <li><a href="zend.currency.usage.html">Using Zend_Currency</a></li>
  <li class="active"><a href="zend.currency.options.html">Options for currencies</a></li>
  <li><a href="zend.currency.description.html">What makes a currency?</a></li>
  <li><a href="zend.currency.position.html">Where is the currency?</a></li>
  <li><a href="zend.currency.number.html">How does the currency look like?</a></li>
  <li><a href="zend.currency.value.html">How much is my currency?</a></li>
  <li><a href="zend.currency.calculation.html">Calculating with currencies</a></li>
  <li><a href="zend.currency.exchange.html">Exchanging currencies</a></li>
  <li><a href="zend.currency.additional.html">Additional informations on Zend_Currency</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>